package com.aizuda.boot.modules.business.comment.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("comment_attachment")
@Schema(description = "评论附件实体")
public class CommentAttachmentEntity {

    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "附件ID（自动生成）", example = "1", accessMode = Schema.AccessMode.READ_ONLY)
    private Integer id;

    @TableField("comment_id")
    @Schema(description = "关联的评论ID", example = "1")
    private Integer commentId;

    @TableField("file_id")
    @Schema(description = "附件文件ID（关联文件表）", example = "123456789")
    private Long fileId;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    @Schema(description = "创建时间（自动生成）", example = "2023-10-01 12:00:00", accessMode = Schema.AccessMode.READ_ONLY)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间（自动生成）", example = "2023-10-01 12:05:00", accessMode = Schema.AccessMode.READ_ONLY)
    private LocalDateTime updatedAt;
}